package com.lanju.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;

@Entity
@Table(name="lj_house_entrust_img")
public class HouseEntrustImg implements Serializable{
	
	private static final long serialVersionUID = -1600219019264329257L;
	
	private String imgId;
	
	private String imgUrl;
	
	private String type;
	
	private Date createTime;
	
	private Entrust entrust;
	
	 @Id
	 @Column(name="imgId",unique=true,nullable=false)
	public String getImgId() {
		return imgId;
	}

	public void setImgId(String imgId) {
		this.imgId = imgId;
	}


	public String getImgUrl() {
		return imgUrl;
	}

	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	@JsonIgnore
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "houseId")
	public Entrust getEntrust() {
		return entrust;
	}

	public void setEntrust(Entrust entrust) {
		this.entrust = entrust;
	}
	

}
